
Originally Posted by
Seamus
Setting QwtScaleEngine::Inverted and setAxisScale( 10, 0 ) works good for me, but QwtPlotRescaler doesn't respect the invert.
I got QwtPlotRescaler working with an my inverted plot:
m_rescaler = new QwtPlotRescaler( canvas() );
m_rescaler
->setReferenceAxis
( QwtPlot::xBottom );
m_rescaler->setRescalePolicy( QwtPlotRescaler::Expanding );
m_rescaler->setEnabled(true);
m_rescaler
->setExpandingDirection
( QwtPlot::yRight, QwtPlotRescaler
::ExpandBoth );
m_rescaler
->setAspectRatio
( QwtPlot::yRight,
0.0 );
m_rescaler = new QwtPlotRescaler( canvas() );
m_rescaler->setReferenceAxis( QwtPlot::xBottom );
m_rescaler->setRescalePolicy( QwtPlotRescaler::Expanding );
m_rescaler->setEnabled(true);
m_rescaler->setExpandingDirection( QwtPlot::yRight, QwtPlotRescaler::ExpandBoth );
m_rescaler->setAspectRatio( QwtPlot::yRight, 0.0 );
To copy to clipboard, switch view to plain text mode
I only had to change
m_rescaler
->setExpandingDirection
( QwtPlot::xBottom, QwtPlotRescaler
::ExpandDown );
m_rescaler->setExpandingDirection( QwtPlot::xBottom, QwtPlotRescaler::ExpandDown );
To copy to clipboard, switch view to plain text mode
to
m_rescaler
->setExpandingDirection
( QwtPlot::yRight, QwtPlotRescaler
::ExpandBoth );
m_rescaler->setExpandingDirection( QwtPlot::yRight, QwtPlotRescaler::ExpandBoth );
To copy to clipboard, switch view to plain text mode
Bookmarks